1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Reference | line()


Syntax
line(x1, y1, x2, y2, draw=True)

DescriptionDraws a line to the screen. A line is a straight path between two points. The first two parameters set the location of the first point (origin), the following two parameters set the location of the second point (destination). You will not notice a line if it's stroke() is the same as the background color, or if the line's strokewidth() is zero.
ReturnsBezierPath containing the line
Tutorial Primitives, Paths


Example
stroke(0.2)
strokewidth(2)
line(10, 20, 80, 80)